export const cn = (...args) => {
  return args
    .reduce((acc, cur) => {
      if (typeof cur === "boolean" || cur === undefined) {
        return acc;
      }
      if (typeof cur === "string") {
        acc.push(cur);
      } else if (Array.isArray(cur)) {
        acc.push(...cur.filter((item) => typeof item === "string"));
      } else if (typeof cur === "object" && cur !== null) {
        acc.push(...Object.keys(cur).filter((key) => cur[key]));
      }
      return acc;
    }, [])
    .join(" ");
};
